package BanyuanClub.Work.Day0309.猜数字;

public class Guest extends Thread {

    private Master master;

    public Guest (Master master){
        this.master = master;
    }
    @Override
    public void run() {
        while (!master.chealRight()){
            int num = (int) (Math.random()*20+1);
            System.out.println(this.getName() + "猜了一个数字" + num);
            master.chealNum(this.getName(),num);
        }
    }
}
